package models

import "time"

type SysOnlineUser struct {
	Id           int       `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"`
	UserId       string    `json:"userId" gorm:"index;size:50" `
	Token        string    `json:"token" gorm:"uniqueIndex;size:64"`
	UserName     string    `json:"userName" gorm:"size:64"`
	NickName     string    `json:"nickName" gorm:"size:64"`
	Ip           string    `json:"ip" gorm:"size:64"`
	Browser      string    `json:"browser"`
	Os           string    `json:"os"`
	Location     string    `json:"location" gorm:"size:100"`
	LoginTime    time.Time `json:"loginTime" gorm:"size:8"`
	LastActiveAt time.Time `json:"last_active_at" gorm:"size:8"`
}

func (SysOnlineUser) TableName() string {
	return "sys_online_user"
}
